package com.uusee.shipshape.bk.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class BaikeDataSourcePK implements java.io.Serializable {
	@Column(name = "source_site")
	private String sourceSite;
	@Column(name = "ori_id")
	private String oriId;

	public BaikeDataSourcePK() {
	}

	public BaikeDataSourcePK(String sourceSite, String oriId) {
		this.sourceSite = sourceSite;
		this.oriId = oriId;
	}

	public String getSourceSite() {
		return sourceSite;
	}

	public void setSourceSite(String sourceSite) {
		this.sourceSite = sourceSite;
	}

	public String getOriId() {
		return oriId;
	}

	public void setOriId(String oriId) {
		this.oriId = oriId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((oriId == null) ? 0 : oriId.hashCode());
		result = prime * result + ((sourceSite == null) ? 0 : sourceSite.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BaikeDataSourcePK other = (BaikeDataSourcePK) obj;
		if (oriId == null) {
			if (other.oriId != null)
				return false;
		} else if (!oriId.equals(other.oriId))
			return false;
		if (sourceSite == null) {
			if (other.sourceSite != null)
				return false;
		} else if (!sourceSite.equals(other.sourceSite))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "BaikeDataSourcePK [oriId=" + oriId + ", sourceSite=" + sourceSite + "]";
	}
}
